package demo02;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class student01 {
    public static void main(String[] args) {
        Student student=new Student();
        student.eat("肉");
        student.eat(1);
        ArrayList list=new ArrayList();
        list.add(1);
        student.eat(list);
        student.setAge("28岁");
        method();
        method02();
    }

    private static void method02() {
        Collection<String> coll = new ArrayList<String>();
        coll.add("天安门");
        coll.add("兵马俑");
        Iterator<String> it = coll.iterator();
        System.out.print(it.next());
        System.out.print(it.next());
        System.out.print(it.next());
    }

    private static void method() {
        Collection<String> coll = new ArrayList<String>();
        coll.add("hello");
        coll.add("world");
        coll.add("java");
        System.out.println(coll.remove("java"));
    }
}
